import request from '@/utils/request'

export function pageManufactureRecordTemplate(data) {
  return request({
    url: '/api/rs/manufacture/record_template/page',
    method: 'post',
    data
  })
}

/**
 * 保存模板数据
 * @param data
 * @returns {AxiosPromise}
 */
export function saveManufactureRecordTemplate(data) {
  return request({
    url: '/api/rs/manufacture/record_template/save',
    method: 'post',
    data
  })
}

/**
 * 修改模板数据
 * @param data
 * @returns {AxiosPromise}
 */
export function updateManufactureRecordTemplate(data) {
  return request({
    url: '/api/rs/manufacture/record_template/update',
    method: 'post',
    data
  })
}


/**
 * 修改模板数据状态
 * @param data
 * @returns {AxiosPromise}
 */
export function updateManufactureRecordTemplateStatus(data) {
  return request({
    url: '/api/rs/manufacture/record_template/update_status',
    method: 'post',
    data
  })
}

/**
 * 获取模板数据
 * @param data
 * @returns {AxiosPromise}
 */
export function getManufactureRecordTemplate(data) {
  return request({
    url: '/api/rs/manufacture/record_template/get',
    method: 'post',
    data
  })
}

/**
 * 添加表单数据
 * @param data
 * @returns {AxiosPromise}
 */
export function saveDataTable(data) {
  return request({
    url: '/api/rs/manufacture/record_template/save_data_table',
    method: 'post',
    data
  })
}


/**
 * 修改表单数据
 * @param data
 * @returns {AxiosPromise}
 */
export function updateDataTable(data) {
  return request({
    url: '/api/rs/manufacture/record_template/update_data_table',
    method: 'post',
    data
  })
}

/**
 * 添加单元格数据
 * @param data
 * @returns {AxiosPromise}
 */
export function saveDataCell(data) {
  return request({
    url: '/api/rs/manufacture/record_template/save_data_cell',
    method: 'post',
    data
  })
}

/**
 * 修改单元格数据
 * @param data
 * @returns {AxiosPromise}
 */
export function updateDataCell(data) {
  return request({
    url: '/api/rs/manufacture/record_template/update_data_cell',
    method: 'post',
    data
  })
}

/**
 * 根据项目获取记录模板
 * @param data
 * @returns {AxiosPromise}
 */
export function getRecordTemplateByDictCode(data) {
  return request({
    url: '/api/rs/manufacture/record_template/get_record_template_by_dict_code',
    method: 'post',
    data
  })
}
